package com.mediator.demo2.main;

import com.mediator.demo2.face.Colleage;
import com.mediator.demo2.face.Mediator;
import com.mediator.demo2.impl.Monitor;
import com.mediator.demo2.impl.QQMediator;
import com.mediator.demo2.impl.StudentA;
import com.mediator.demo2.impl.StudentB;
import com.mediator.demo2.impl.TuanZhiShu;

public class Client {

	public static void main(String[] args) {
		Mediator qq = new QQMediator();
		Colleage studentMonitor = new Monitor("Vincent");
		Colleage studentTuanZhiShu = new TuanZhiShu("Robort");
		Colleage studentA = new StudentA("Sam");
		Colleage studentB = new StudentB("Tom");

		/*----------------------班长发通知-----------------------------*/
		qq.add_student(studentMonitor);
		qq.add_student(studentTuanZhiShu);
		qq.add_student(studentA);
		qq.add_student(studentB);
		// 设置大家的回复信息
		studentMonitor.setContent("明天下午2点开年级会，收到回复^^。");
		studentTuanZhiShu.setContent("知道了，肯定到!!");
		studentA.setContent("收到了，但是可能晚点到!!");
		studentB.setContent("收到了，但是明天要去面试!!");
		// 开始发通知
		qq.notify(studentMonitor);
		/*--------------------两个同学私下交流--------------------------*/
		studentMonitor.setContent("你觉得咱们“软件项目管理老师”讲的怎么样？");
		studentA.setContent("我觉得讲的不够生动，还点名，不太好!!!");
		qq.chart(studentMonitor, studentA);
	}

}
